#include "Object.h"

unsigned int Object::ObjectGlobalId::sNextGlobalValue = 1;

Object::ObjectGlobalId::ObjectGlobalId()
: ObjectId(sNextGlobalValue++)
{
}

Object::ObjectGlobalId::ObjectGlobalId(const ObjectGlobalId &)
: ObjectId(sNextGlobalValue++)
{
}

Object::Object()
{
}

Object::~Object()
{
}

Object::Object(const ObjectId &id)
    : m_id(id)
{
}

Object::Object(const Object &other)
    : m_id(other.m_id)
{
}

Object &
Object::operator =(const Object &other)
{
    m_id = other.m_id;
    return *this;
}

QDataStream & operator <<(QDataStream &out, const Object &obj)
{
    out << obj.id();
    return out;
}

QDataStream & operator >>(QDataStream &in, Object &obj)
{
    ObjectId id;
    in >> id;
    obj.setId(id);
    return in;
}



